const { JSEncrypt } = require('encryptlong')
let startTime = new Date();
//公钥
const PUBLIC_KEY = `
    -----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs3fGeVEqU9ugHvVpz+aX
v8LSIKcrGE36rfdsbyTVDcQv1GuySbnOm1VzkFyAsJqdHuEhEaHgryN/EX4+v0WY
tZ1koo6xfGLfcH4Iqa5gVqXAy2+cuhW3x4R95GNdeQIBOriebgtjVLMxppWHoY+A
G6rFNHoJxoYwIOHqvu2FlLEJDHYMlwJaD7PowXEzc3LODsLIsCThkMIPREwh0U/y
6fOL6ezageqU02Sz+BoNa575vdAQfcTVEvYGMGK0Y5m4dP2C5iMoO4rOcFxZHl9d
rAzxNuAEPyhTnNneH9pJQgROBjO9kKFSo+UaaU/xWZ5SM7upmR2SkbKtNA0YguLw
YwIDAQAB
-----END PUBLIC KEY-----
`;

// 使用设置公私钥
const enc = new JSEncrypt();
enc.setPublicKey(PUBLIC_KEY);

export function setRSApass(data) {
    return enc.encryptLong(data)
}


